const Utils = require("../utils");
const { SERVER_ERROR_CODE } = require("../config/admin/state_code");
module.exports = options =>{
  return async function ajaxAuth(ctx, next) {
    if(!ctx.session.id) ctx.body = Utils.createServerMsg("没有访问权限",SERVER_ERROR_CODE,"");
    await next();
  }
};
